
const { STRING, INTEGER, DATE, LONGSTRING } = require('../types')

module.exports = (sequelize) => {
  const transferrecord = sequelize.define(
    'transferrecord',
    {// 在这里定义模型属性
      record_id: {
        type: INTEGER,
        primaryKey:true,
        autoIncrement:true,
        allowNull:false
      },
      package_id: { // 包裹id
        type: INTEGER,
      },
      transfer_person_id: { // 转运人员id
        type: STRING,
      },
      transfer_vehicle_id: { // 转运车辆牌照
        type: STRING,
      },
      track_points: { // 车辆轨迹坐标
        type: LONGSTRING,
      },
      start_time: { // 出发时间
        type: DATE,
      },
      end_time: { // 到达时间
        type: DATE,
      }
    },
    {
    tableName: "sys_waste_transport",//直接提供表名
    timestamps: false
   }
  );
  return transferrecord
}
